package com.thread.deadLock;

/**
 * MyDeadLock--bdqnPractice
 *
 * @author: Jovi
 * @createTime: 2017-08-22 14:04
 **/
public class MyDeadLock implements Runnable {

    private DeadLockRisk dl = new DeadLockRisk();

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println("i="+i);
            dl.read();
            dl.write(1,2);
        }

    }
}
